package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.MarketBrand;
import com.cskaoyan.bean.param.BaseParam;
import com.cskaoyan.bean.vxaddressvo.VXBrandListVO;
import com.cskaoyan.service.vxbrand.VXBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 创建日期: 2022/05/08 19:47
 *
 * @author shuyang
 */
@RestController
@RequestMapping("wx/brand")
public class BrandWXController {
    @Autowired
    VXBrandService vxBrandService;

    @GetMapping("list")
    public BaseRespVo<VXBrandListVO> queryBrandListInVX(BaseParam baseParam) {
        VXBrandListVO vxBrandListVO = vxBrandService.queryBrandListInVX(baseParam);
        return BaseRespVo.ok(vxBrandListVO);
    }

    @GetMapping("detail")
    public BaseRespVo<MarketBrand> queryBrandDetail(Integer id) {
        MarketBrand marketBrand = vxBrandService.queryBrandDetail(id);
        return BaseRespVo.ok(marketBrand);
    }
}
